home *** CD-ROM | disk | FTP | other *** search
- Path: ux5.cso.uiuc.edu!djhoward
- From: djhoward@ux5.cso.uiuc.edu (howard daniel joseph)
- Newsgroups: comp.sys.amiga.programmer,uiuc.class.cs110c,uiuc.class.cs223
- Subject: How do I define my integers?
- Date: 13 Jan 1996 02:04:00 GMT
- Organization: University of Illinois at Urbana
- Approved: Mu
- Message-ID: <4d73ug$25v@vixen.cso.uiuc.edu>
- NNTP-Posting-Host: dclsn34.cen.uiuc.edu
- To: uiuc-class-cs110c@ux1.cso.uiuc.edu
- X-Newsreader: TIN [version 1.2 PL2]
- Status: R
- Content-Length: 1451
-
- Okay. I'm writing a program under GCC on my Amiga.
-
- But I'm confused to hell over integer limits.
-
- My book talks about 2 bit and 4 bit integers ... and four bit
- integers like what it describers long integers to be. Of course there's
- unsigned integers and the like too.
-
- How do I declare signed versus unsigned integers?
-
- How do I know how many bits my integers are using?
-
- How do I declare signed and unsigned long integers?
-
- What's with these "doubles" the book mysteriously alludes to?
-
- What *am* I creating when I type;
-
- int somevalue;
- (ie Is it signed/unsigned? How many bits?)
-
- I know many of the answers here, but if I could get them all from one
- source I'd feel a lot better.
-
- I need two sorts of values for my project;
-
- An integer (unsigned) that can handle, 6, though ideally 9 places (Just
- under 250000000 would be the maximum forseen possible value here.)
-
- An integer that can handle a much bigger number ... 12 places at least for
- now.
-
- Can I perform simple maths (addition, division) between integers of
- different types? I'd assume so, right?
-
- --
- =====///====================================================================
- ====///=======This message brought to you by dannyman@uiuc.edu==============
- \\\///=========HOME PAGE! http://www.uiuc.edu/ph/www/djhoward ==============
- =\XX/A1200==================================================================
- My views are my own, and not those of my employer or UIUC. Happy Jim?
-
-